Database Error

DB Error: syntax error

SELECT WebpageAdmin.id as id, webpage_title, webpage_content, site_id, layout_code FROM WebpageAdmin JOIN Layout on Layout.id = layout_id where site_id = 60 AND displayed = 1 AND webpage_url = 'Javascript:fp_ShowImg(document['fpphoto_2119'],'450','322','6566',0)' [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'fpphoto_2119'],'450','322','6566',0)'' at line 10]